package cn.iocoder.yudao.module.warehouseUsage.dal.mysql.warehouseUsage;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.warehouseUsage.dal.dataobject.warehouseUsage.warehouseUsageDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.warehouseUsage.controller.admin.warehouseUsage.vo.*;

/**
 * 使用记录 Mapper
 *
 * @author wwwhk
 */
@Mapper
public interface warehouseUsageMapper extends BaseMapperX<warehouseUsageDO> {

    default PageResult<warehouseUsageDO> selectPage(warehouseUsagePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<warehouseUsageDO>()
                .likeIfPresent(warehouseUsageDO::getWarehouseName, reqVO.getWarehouseName())
                .eqIfPresent(warehouseUsageDO::getUpdater, reqVO.getUpdater())
                .orderByDesc(warehouseUsageDO::getId));
    }

}